<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        //自定义对象一
        var person1=new Object();
        person1.name='test'
        person1.sayHello=function(){
            alert(person1.name+' say hello')
        }

        person1.sayHello();
        // 自定义对象二
        var person2={
            name:'pan',
            sayHellp:function(){
                alert(this.name+'say hellp');
            }
        }
        person2.sayHellp();
        alert(person2.name);
 </script>
</head>
<body>
    
</body>
</html>